//
//  XS_WebImage.swift
//  EKLWisdom2021
//
//  Created by 韩云智 on 2021/5/2.
//

import UIKit
import Foundation
import SDWebImage

public extension UIImage {
    static func xsGif(_ name: String, bundle: Bundle = Bundle.main) -> UIImage? {
        guard let path = bundle.path(forResource: name, ofType: "gif"),
              let data = try? Data(contentsOf: URL(fileURLWithPath: path)) else { return nil }
        return UIImage.sd_image(withGIFData: data)
    }
} 
